<script type="text/javascript" >
    stFacebookToolbox.load_tooltip();
function campaign_export(){
    window.open('<?php echo get_bloginfo('url');?>/coupon/campaign_export.php?format='+jQuery("#format").val()+'&sort='+jQuery("#sort").val()+'&user=<?php echo $user;?>');
}
</script>
<div class="w100p bgl">
    <div class="w100p bgr p5b">
        <form class="stform" id="stFacebookToolboxForm" action="<?php echo admin_url('/admin.php?page=' . $config['plugin_name'] . '&action=' . $current_action) ?>" method="post" >
            <ul>
                <li>
                    <label><?php _e('Sort by', $config['plugin_name']); ?>:</label>
                    <div class="required">
                        <select name="sort" id="sort">
                            <option value="CouponTemplateName">Name</option>
                            <option value="ValidFromDateTime">Valid from</option>
                            <option value="ValidToDateTime">Valid to</option>
                            <option value="number_coupon">Number of coupons</option>
                            <option value="number_sale">Number of sales</option>
                            <option value="number_coupon">Number of customers</option>
                            <option value="conversion">Conversion rate</option>
                        </select>
                       
                    </div>
                    <br clear="both" />
                </li>
                <li>
                    <label><?php _e('Report format', $config['plugin_name']); ?>:</label>
                    <div class="required">
                        <select name="format" id="format">
                            <option value="pdf">PDF</option>
                            <option value="csv">CSV</option>
                        </select>
                       
                    </div>
                    <br clear="both" />
                </li>
                
               <li>
                   <a class="button add-new-h2 anchor" style="margin-left: 206px;" href="javascript:void(0);" onclick="campaign_export();">Report</a>
                </li>

          
            </ul>
           
        </form>
    </div>
</div>
